
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="target-densitydpi=device-dpi, width = 540, user-scalable = 0" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My ARchitect World</title>



<!-- Include the ARchitect library -->
<script src="architect://architect.js"></script>


<script>

var label = null;
var initialLabelValue = "No Text";
    
function createLabelAtLocation(geoLocation)
{
    label = new AR.Label(initialLabelValue, 2, {onClick : function(){
                                document.location = 'architectsdk://labelClick?text='+label.text;
                             }});
    
    var geoObject = new AR.GeoObject(geoLocation, {drawables: {cam: label}});
}
    
function setupScene()
{
    createLabelAtLocation( new AR.RelativeLocation(null, 100, 0, 0) );
}
    
function didReceivedNewTextForLabel(text)
{
    if(label)
    {
        label.text = text;
    } else {
    	initialLabelValue = text;
    }
}

function clickedClose() {
	document.location = 'architectsdk://actionButton?action=close';
}

function clickedHide() {
    document.location = 'architectsdk://hideButton?status=hide';
}
   

</script>
</head>
    
<body onLoad="setupScene()">

<!-- Button to close AR view, you may use this to hide arView and navigate back to familiar phoneGap environment -->
<button title="close" onclick="clickedClose()">CLOSE AR</button>
<!-- NOT RECOMMENDED 
<button title="hide" onclick="clickedHide()">(hide)</button>
 -->
</body>
    
</html>